package chixing.day18.homework.work3_2;

public class Printer {
    public synchronized void printDocument(String documentName) {
        System.out.println("打印开始-----" + documentName);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("打印结束-----"+ documentName);
    }
}
